const express = require('express');

const app = express();

app.get('/request',(req,res) => {

    //获取请求参数
    console.log(req.url);
    console.log(req.method);
    console.log(req.headers);
    console.log(req.httpVersion);


    //express

    console.log(req.host);
    console.log(req.path);
    console.log(req.query);
    console.log(req.get('host'));

    res.end('request');
});

app.listen(3000,()=> {
    console.log('服务已经开启 3000端口监听中.......');
});